Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start improving local deployments #136

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pierotibou
Copy link
Collaborator

@pierotibou pierotibou commented Jul 21, 2022

Allow deploying a nuget to the dev package feed with local AAS modification (xdt files, packaging...).
To do so, I tried to reuse what Alexander had setup for nightly deploys. So we now have deploy-packages-local.sh that will call the same scripts given a tracer sha and a package version.
I've also added a bit of cleanup for this process to be ran several times (remove intermediary files, .gitignore).

There are still a few things to improve. The main ones being:

  • Stop modifying files where they are committed, so that you don't have to revert modifications in between each run
  • Use a local version of the tracer (even though copying the tracer files on an existing extension works well)

I've tested the changes, both locally, and on the deploy github action (cf this run )

@pierotibou pierotibou requested a review from a team as a code owner July 21, 2022 07:52
andrewlock
andrewlock previously approved these changes Jul 21, 2022
Copy link
Member

@andrewlock andrewlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, if it's tested 🤷‍♂️ YOLO

dev_version="$1"
AZDO_PAT=$2

dotnet nuget add source https://pkgs.dev.azure.com/datadoghq/dd-trace-dotnet/_packaging/Public_Feed/nuget/v3/index.json --name Public_Feed --username any_string --password $AZDO_PAT --store-password-in-clear-text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wary of using this ever since I've been burnt in the past as artifiacts go in, are never removed, use up your allowance, and kill all CI... so on your head be-it 😛

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 , Thanks for raising this, I didn't see this as a potential issue.
Here, we will do this only for testing changing on the extension itself and its setup, which is quite rare. So I assume it lowers the risk.
That said, we planned to do that on nightly builds, where the impact would be greater. I'll discuss it with @shurivich as well as they used to do that in Ozcode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may just be scare-mongering, it's just something I avoid in personal projects now 🙂 Oh wait... maybe that was GitHub... pfft, I forget 😂

@pierotibou pierotibou changed the title Start improve local deployments Start improving local deployments Jul 28, 2022
echo "Downloading agent from ${AGENT_DOWNLOAD_URL}"
wget -O agent.zip $AGENT_DOWNLOAD_URL
#wget -O agent.zip $AGENT_DOWNLOAD_URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be uncommented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep... Thanks a lot for catching it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 802a5e5

TRACER_DOWNLOAD_URL="https://apmdotnetci.blob.core.windows.net/apm-dotnet-ci-artifacts-master/$TRACER_SHA/windows-tracer-home.zip"

echo "Downloading tracer from $TRACER_DOWNLOAD_URL"
#wget -O tracer.zip $TRACER_DOWNLOAD_URL
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be uncommented?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 802a5e5

@@ -0,0 +1,7 @@
INSTALL_SHA="38787d2e9cadd408f541675e95fab7b9a687d559"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get how the SHA is set for the GitHub Action, but is this also supposed to work right with a local dev build or is that out of scope?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's out of scope. As said in the description, 2 things are not yet handled: use a local tracer, and modify where the files are modified to avoid having to revert modified files (as the build process do a lot of sed to change the version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants